/*
  * 	pdgm_config.lua
  *
  *	Purpose: 
  *		-load all of the config files out of the data folder
  *		-provide parsing facilities for ini style configs
  *		-provide config writing and updating facilities
  */
  
pdgm.config = {}

local pairs, ipairs = pairs, ipairs
local configList = {}
local tempConfigList = "config/temp_configlist.txt"

local pdgm.config.addConfig( config )
	table.insert( configList, config )
end


function pdgm.config.load()
	// load configs from flat file for now, but the configs shoudl be hard-coded eventually, and if another needs to be added, addConfig should be called
	if( file.Exists( tempConfigList ) ) then
		local contents = file.Read( tempConfigList )
		
		for( line in contents:lines() ) do
			table.insert( configList, tostring( line .. ".ini" ) )
		end
	end
	
	for( _,v in pairs( configList ) ) do
		local result = parse( 
	end
end

function pdgm.config.parse( config )

end
